home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / mkmf / RCS / mkmf.bigcmdtop,v < prev    next >
Text File  |  1991-04-11  |  6KB  |  306 lines

  1. head     1.8;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.8
  10. date     91.04.11.12.53.36;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.7;
  13.  
  14. 1.7
  15. date     89.10.09.21.28.49;  author rab;  state Exp;
  16. branches 1.7.1.1;
  17. next     1.6;
  18.  
  19. 1.6
  20. date     89.08.18.11.21.56;  author douglis;  state Exp;
  21. branches ;
  22. next     1.5;
  23.  
  24. 1.5
  25. date     89.08.17.11.16.29;  author douglis;  state Exp;
  26. branches ;
  27. next     1.4;
  28.  
  29. 1.4
  30. date     89.04.06.21.40.45;  author jhh;  state Exp;
  31. branches ;
  32. next     1.3;
  33.  
  34. 1.3
  35. date     88.12.28.17.05.59;  author ouster;  state Exp;
  36. branches ;
  37. next     1.2;
  38.  
  39. 1.2
  40. date     88.11.27.16.29.05;  author ouster;  state Exp;
  41. branches ;
  42. next     1.1;
  43.  
  44. 1.1
  45. date     88.09.09.17.43.49;  author ouster;  state Exp;
  46. branches ;
  47. next     ;
  48.  
  49. 1.7.1.1
  50. date     89.10.27.10.36.29;  author douglis;  state Exp;
  51. branches ;
  52. next     ;
  53.  
  54.  
  55. desc
  56. @@
  57.  
  58.  
  59. 1.8
  60. log
  61. @Flush DEFTARGET: the default target is now determined by a pmake
  62. library file.
  63. @
  64. text
  65. @#!/sprite/cmds/csh -f
  66. #
  67. # A script to generate (or regenerate) a Makefile for the topmost directory
  68. # of a library that is divided up into subdirectories.  This direcctory is
  69. # little more than a container for lots of subdirectories that have the
  70. # interesting stuff in them.
  71. #
  72. # We assume we were invoked from mkmf.
  73. #
  74. # Parameters passed in from mkmf as environment variables:
  75. #    MKMFDIR        directory containing prototype makefiles
  76. #    MAKEFILE    name of makefile to create
  77. #    MACHINES    list of machine names (e.g. "sun2 sun3"), for
  78. #            which there are machine-dependent subdirectories
  79. #            (sun3.md, spur.md, etc.) of this directory.
  80. #    SUBTYPE        what sort of library this is:  "sprite", "x", etc.
  81. #
  82. # Several of these environment variables must be copied to local shell
  83. # variables before use, because shell variables can be used in some places
  84. # where environment variables can't.
  85. #
  86. # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.7 89/10/09 21:28:49 rab Exp Locker: kupfer $ (SPRITE) Berkeley
  87. #
  88.  
  89. #
  90. # Argument processing.  (Generalized form, even though just one flag so far.)
  91. #
  92. while ($#argv >= 1)
  93.     if ("$1" == '-x') then
  94.     set echo
  95.     endif
  96.     shift
  97. end
  98.  
  99. set subtype=$SUBTYPE
  100. set name=$cwd:t
  101. set machines=($MACHINES)
  102. set makefile=$MAKEFILE
  103. set distdir=($DISTDIR)
  104.  
  105. if (-e $makefile.proto) then
  106.     set proto=$makefile.proto
  107. else
  108.     set proto="${MKMFDIR}/Makefile.bigcmdtop"
  109. endif
  110.  
  111. echo "Generating $makefile for $cwd using $proto"
  112.  
  113. set subDirs="`find * -type d ! -name \*.md ! -name RCS -prune -print`"
  114.  
  115. if ("$subDirs" == "") then
  116.     echo "No subdirectories found."
  117. endif
  118.  
  119. set nonomatch
  120. set manPages = (*.man)
  121. if ("$manPages" == "*.man") then
  122.     set manPages = ()
  123. endif
  124. unset nonomatch
  125.  
  126. cat $proto | sed \
  127.     -e "s,@@(DATE),`date`,g" \
  128.     -e "s,@@(MACHINES),$machines,g" \
  129.     -e "s,@@(MAKEFILE),$makefile,g" \
  130.     -e "s,@@(MANPAGES),$manPages,g" \
  131.     -e "s,@@(NAME),$name,g" \
  132.     -e "s,@@(SUBDIRS),$subDirs,g" \
  133.     -e "s,@@(TEMPLATE),$proto,g" \
  134.     -e "s,@@(TYPE),$subtype,g" \
  135.     -e "s,@@(DISTDIR),$distdir,g" \
  136.     > $makefile
  137. @
  138.  
  139.  
  140. 1.7
  141. log
  142. @Modifications for distribution.
  143. @
  144. text
  145. @a10 1
  146. #    DEFTARGET    name of default target
  147. d22 1
  148. a22 1
  149. # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.6 89/08/18 11:21:56 douglis Exp Locker: rab $ (SPRITE) Berkeley
  150. a38 1
  151. set defTarget=($DEFTARGET)
  152. a63 1
  153.     -e "s,@@(DEFTARGET),${defTarget:q},g" \
  154. @
  155.  
  156.  
  157. 1.7.1.1
  158. log
  159. @add dependencies to make the linked files depend on recursive makes.
  160. this is a branch because we chose to do it using bigcmdtop.mk instead.
  161. @
  162. text
  163. @d23 1
  164. a23 1
  165. # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.7 89/10/09 21:28:49 rab Exp Locker: douglis $ (SPRITE) Berkeley
  166. a75 7
  167.  
  168. # add dependencies to make the linked files depend on recursive makes.
  169. # the tr is needed because csh is brain-damaged about "$" within single quotes,
  170. # even when escaped.
  171. foreach subdir ($subDirs)
  172.     echo "$subdir/%(TM).md/linked.o $subdir/%(TM).md/linked.po: $subdir" | tr % '$' >> $makefile
  173. end
  174. @
  175.  
  176.  
  177. 1.6
  178. log
  179. @another change for TM -- use single machine if it exists, else \ds3100
  180. @
  181. text
  182. @d23 1
  183. a23 1
  184. # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.4 89/04/06 21:40:45 jhh Exp Locker: douglis $ (SPRITE) Berkeley
  185. d41 1
  186. d74 1
  187. @
  188.  
  189.  
  190. 1.5
  191. log
  192. @removed DEFTARGET -- we use $MACHINE now
  193. @
  194. text
  195. @d11 1
  196. d40 1
  197. d65 1
  198. @
  199.  
  200.  
  201. 1.4
  202. log
  203. @added abilty to make specific machine types
  204. @
  205. text
  206. @a10 1
  207. #    DEFTARGET    name of default target
  208. d22 1
  209. a22 1
  210. # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.3 88/12/28 17:05:59 ouster Exp $ (SPRITE) Berkeley
  211. a38 1
  212. set defTarget=($DEFTARGET)
  213. a62 1
  214.     -e "s,@@(DEFTARGET),$defTarget,g" \
  215. @
  216.  
  217.  
  218. 1.3
  219. log
  220. @Replace INSTALLDIR and INSTALLMAN with TYPE.
  221. @
  222. text
  223. @d11 1
  224. d23 1
  225. a23 1
  226. # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.2 88/11/27 16:29:05 ouster Exp $ (SPRITE) Berkeley
  227. d40 1
  228. a48 6
  229.  
  230. if (" $machines " =~ *\ sun3\ *) then
  231.     set defTarget=sun3
  232. else
  233.     set defTarget=$machines[1]
  234. endif
  235. @
  236.  
  237.  
  238. 1.2
  239. log
  240. @Various changes to replace old C library entirely with new C library.
  241. @
  242. text
  243. @d22 1
  244. a22 1
  245. # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.1 88/09/09 17:43:49 ouster Exp Locker: ouster $ (SPRITE) Berkeley
  246. a35 25
  247. switch ($subtype)
  248.     case sprite:
  249.     set installdir=/sprite/cmds
  250.     set installman=/sprite/doc/ref/cmds
  251.     breaksw
  252.     case daemon:
  253.     set installdir=/sprite/daemons
  254.     set installman=/sprite/doc/ref/daemons
  255.     breaksw
  256.     case test:
  257.     set installdir=/sprite/tests
  258.     set installman=/sprite/doc/ref/tests
  259.     breaksw
  260.     case admin:
  261.     set installdir=/sprite/admin
  262.     set installman=/sprite/doc/ref/admin
  263.     breaksw
  264.     case x:
  265.     set installdir=/X/cmds
  266.     set installman=/X/doc/ref/cmds
  267.     breaksw
  268.     default:
  269.     echo Unknown library subtype "$subtype"
  270.     exit 1
  271. endsw
  272. a69 2
  273.     -e "s,@@(INSTALLDIR),$installdir,g" \
  274.     -e "s,@@(INSTALLMAN),$installman,g" \
  275. d76 1
  276. @
  277.  
  278.  
  279. 1.1
  280. log
  281. @Initial revision
  282. @
  283. text
  284. @d18 3
  285. a20 1
  286. # $Header: mkmf.biglibtop,v 1.1 88/08/20 12:58:43 ouster Exp $ (SPRITE) Berkeley
  287. d22 2
  288. d39 1
  289. d41 12
  290. d55 1
  291. d61 1
  292. a61 1
  293. set lib=$cwd:t
  294. d85 7
  295. d93 1
  296. a93 2
  297.     -e "s,@@(NAME),$lib,g" \
  298.     -e "s,@@(MACHINES),$machines,g" \
  299. a94 1
  300.     -e "s,@@(SUBDIRS),$subDirs,g" \
  301. d96 2
  302. d99 3
  303. a102 1
  304.     -e "s,@@(DATE),`date`,g" \
  305. @
  306.